<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var arr = {
            A: [{
                city: "武汉"
            }, {
                city: "广州"
            }],
            B: [{
                city: "深圳"
            }, {
                city: "广州"
            }],
            C: [{
                city: "上海"
            }, {
                city: "武汉"
            }]
        }
        /* 
        var citys  = ["武汉","广州","深圳","上海"]
         */
        var list = []
        for (k in arr) {
            list.push(...arr[k])
        }
        console.log(list)
        var res = [];
        list.forEach(item => {
            // console.log(item)
            if(!res.includes(item.city)){
                res.push(item.city)
            }
        })
        console.log(res)
            // var values = Object.values(arr);
            // var res = []
            // values.forEach(item=>{
            //     item.forEach(k=>{
            //         if(!res.includes(k.city)){
            //         res.push(k.city)
            // }
            //     })
            // })
            // console.log(res)
    </script>
</body>

</html>